// @ts-ignore
/* eslint-disable */
import { api } from "@/utils/api";

/** 新增经营-采购计划表数据 POST /managePlan/add */
export async function managePlanAdd(
  body: BIZAPI.ManagePlanCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResult>;

export async function managePlanAdd(
  body: BIZAPI.ManagePlanCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResult>>;

export async function managePlanAdd(
  body: BIZAPI.ManagePlanCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResult>;

export async function managePlanAdd(
  body: BIZAPI.ManagePlanCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResult>(`/app/managePlan/add`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResult>(`/app/managePlan/add`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 审核 POST /managePlan/check */
export async function managePlanCheck(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function managePlanCheck(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function managePlanCheck(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function managePlanCheck(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/managePlan/check`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/managePlan/check`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除经营-采购计划表数据 POST /managePlan/delete */
export async function managePlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResult>;

export async function managePlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResult>>;

export async function managePlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResult>;

export async function managePlanDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResult>(`/app/managePlan/delete`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResult>(`/app/managePlan/delete`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购计划表数据 POST /managePlan/get */
export async function managePlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultManagePlanEntity>;

export async function managePlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultManagePlanEntity>>;

export async function managePlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultManagePlanEntity>;

export async function managePlanGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultManagePlanEntity>(`/app/managePlan/get`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultManagePlanEntity>(`/app/managePlan/get`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购计划表VO数据 POST /managePlan/getVo */
export async function managePlanGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultManagePlanResp>;

export async function managePlanGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultManagePlanResp>>;

export async function managePlanGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultManagePlanResp>;

export async function managePlanGetVo(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultManagePlanResp>(`/app/managePlan/getVo`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultManagePlanResp>(`/app/managePlan/getVo`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购计划表分页数据 POST /managePlan/page */
export async function managePlanPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageManagePlanEntity>;

export async function managePlanPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageManagePlanEntity>>;

export async function managePlanPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageManagePlanEntity>;

export async function managePlanPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageManagePlanEntity>(`/app/managePlan/page`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultIPageManagePlanEntity>(`/app/managePlan/page`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 驳回 POST /managePlan/refuse */
export async function managePlanRefuse(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function managePlanRefuse(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function managePlanRefuse(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function managePlanRefuse(
  body: BIZAPI.ManagePlanEntity,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/managePlan/refuse`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/managePlan/refuse`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 提交 POST /managePlan/submit */
export async function managePlanSubmit(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function managePlanSubmit(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function managePlanSubmit(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function managePlanSubmit(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/managePlan/submit`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultObject>(`/app/managePlan/submit`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 更新经营-采购计划表数据 POST /managePlan/update */
export async function managePlanUpdate(
  body: BIZAPI.ManagePlanUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResult>;

export async function managePlanUpdate(
  body: BIZAPI.ManagePlanUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResult>>;

export async function managePlanUpdate(
  body: BIZAPI.ManagePlanUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResult>;

export async function managePlanUpdate(
  body: BIZAPI.ManagePlanUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResult>(`/app/managePlan/update`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResult>(`/app/managePlan/update`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取经营-采购计划表VO分页数据 POST /managePlan/voPage */
export async function managePlanVoPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageManagePlanResp>;

export async function managePlanVoPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageManagePlanResp>>;

export async function managePlanVoPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageManagePlanResp>;

export async function managePlanVoPage(
  body: BIZAPI.ManagePlanQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageManagePlanResp>(`/app/managePlan/voPage`, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
      tupleResponse: true,
    });
  }

  return api<BIZAPI.IResultIPageManagePlanResp>(`/app/managePlan/voPage`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
